//
//  AttackHeaderModel.m
//  GiftNote
//
//  Created by wsh on 15/8/12.
//  Copyright (c) 2015年 GN. All rights reserved.
//

#import "AttackHeaderModel.h"
#import "HomeGiftModel.h"

@implementation AttackHeaderModel
- (void)setValue:(id)value forUndefinedKey:(NSString *)key{

    
}


- (instancetype)init{
    if (self = [super init]) {
        self.posts = [NSMutableArray arrayWithCapacity:0];
    }
    return self;
}



-(void)setValue:(id)value forKey:(NSString *)key{
    
    if ([key isEqualToString:@"id"]) {
        
        self.headerid = value;
    } else if ([key isEqualToString:@"posts"]){
        
        for (NSDictionary *dic in value) {
            HomeGiftModel *model = [[HomeGiftModel alloc] init];
            [model setValuesForKeysWithDictionary:dic];
            [self.posts addObject:model];
        }
    
    } else {
        
        [super setValue:value forKey:key];
    }
}




@end
